<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>安昇租车-南京及周边城市租车最低价！！</title>
    <link rel="dns-prefetch" href="http://www.ashlybus.com/m/test">
    <meta name="description" content="安昇租车-提供5~63座配驾租车服务,承接南京及周边城市旅游租车、会议接送、商务接待、婚庆租车、机场接送、团体租车、企业班车。Tel:18120116637（兼微信）">
    <meta name="keywords" content="南京租车,安昇,安昇租车,租车,租车网,租车公司,汽车租赁,租车价格,旅游租车,婚庆租车,商务租车,企业租车,包车,租车手续">
    <script src="../js/flexible.js"></script>
    <script src="../js/vue.js"></script>
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="../css/other.css">
</head>
<body>
    <div id="searchDetail">
        <div class="title">
            <a href="javascript:history.back(-1);" class="back"></a>
            <h2>车辆详情</h2>
            <i class="index"><a href="../index.html">首页</a></i>
        </div>
        <!--banner-->
        <div class="container">
            <div class="banner">
                <ul>
                    <li v-for="(img,index) in carimg" :class="{'active':index==1}">
                        <a href="#">
                            <img :src="img">
                        </a>
                    </li>
                </ul>
                <ol>
                    <li v-for="(img,index) in carimg" :class="{'active':index==1}">
                        <i></i>
                    </li>
                </ol>
            </div>
        </div>
        <div v-html="cartxt" class="txt"></div>
        <div class="btns">
            <a href="tel:18120116637">电话咨询</a>
            <a href="http://p.qiao.baidu.com/cps2/chatIndex?reqParam=%7B%22from%22%3A0%2C%22sessionid%22%3A%22-100%22%2C%22siteId%22%3A%2210708010%22%2C%22tid%22%3A%22-1%22%2C%22userId%22%3A%2222534827%22%2C%22ttype%22%3A1%7D">价格咨询</a>
            <a href="http://p.qiao.baidu.com/cps2/chatIndex?reqParam=%7B%22from%22%3A0%2C%22sessionid%22%3A%22-100%22%2C%22siteId%22%3A%2210708010%22%2C%22tid%22%3A%22-1%22%2C%22userId%22%3A%2222534827%22%2C%22ttype%22%3A1%7D">预约咨询</a>

        </div>
    </div>
<script src="../js/jquery-1.10.2.min.js"></script>
<script src="../js/common.js"></script>
<script src="../js/banner.js"></script>
<script>
    var search_detail=new Vue({
        el:'#searchDetail',
        data:{
            detail_id:{},
            cartxt:{},
            carimg:{}
        },
        methods:{
            getData:function(){
                var _self=this;
                var href=window.location.href;
                this.detail_id=href.split("detail_id=")[1];
                $.ajax({
                    url:"../data/search_details.php",
                    data:{
                        "detail_id":_self.detail_id,
                        cartxt:{}
                    },
                    success:function(data,textStatus,jqXHR){
//                        重复插入首位两个路径，0->插入img[len-1],img[len]=img[0]
                        _self.carimg=data.img;
                        var len=_self.carimg.length;
                        _self.carimg[len]=data.img[0];
                        _self.carimg.unshift(data.img[--len]);
//                        pro_content处理,去除&nbsp;,按strong标签分割,拼接p
                        var arr=data[0].pro_content.split("&nbsp;");
                        for(var i=0,arr2=[],j=0;i<arr.length;i++){
                            arr[i].replace(/^\s\s*/, '')===""?null:arr2[j++]=arr[i];
                        }
                        for(var i= 0,str='';i<arr2.length;i++){
                            str+=arr2[i];
                        }
                        var arr3=str.split("<strong>");
                        for(var i= 1,str2="";i<arr3.length;i++){
                            arr3[i]="<p><strong>"+arr3[i]+"</p>";
                            str2+=arr3[i];
                        }
                        function getCookie(name)
                        {
                            var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
                            if(arr=document.cookie.match(reg))
                                return (arr[2]);
                            else
                                return null;
                        }
                        str2=str2.replace(/[^\d](1[34578]\d{9})[^\d]/g,function(kw,$1){
                            return kw.replace(/1[34578]\d{9}/g,getCookie("placeTel"));
                        });
                        _self.cartxt=str2;
//                        css样式调整
                        _self.$nextTick(function(){
                            BannerCss(750,525);
                            Banner();
                        });
                    },
                    error:function(XMLHttpRequest, textStatus, errorThrown){
                        console.log(XMLHttpRequest, textStatus, errorThrown);
                    }
                });
            }
        }
    });
    search_detail.getData();
</script>
</body>
</html>